<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改分类</title>
<link rel="stylesheet" href="styles/bootstrap.min.css">
<script src="scripts/jquery.min.js"></script>
<script src="scripts/bootstrap.min.js"></script>
</head>
<body>
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h4 class="modal-title" id="myModalLabel">修改分类</h4>
	</div>
	<div class="modal-body">
		<form role="form" class="form-horizontal" method="post">
			<div class="form-group">
				<label class="col-sm-3 control-label">类型名：</label>
				<div class="col-sm-9">
					<input type="text" name="category.type"  class="form-control" value="${category.type}" placeholder="请输入类型名"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">上级分类：</label>
				<div class="col-sm-9">
					<s:select list="typeToSelect" name="category.pid" listValue="type" value="pid"  listKey="id" cssClass="form-control">
					</s:select>
				</div>
			</div>
		</form>
	</div>
	<div class="modal-footer">
		<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
		<button type="button" class="btn btn-primary" onclick="addClassify()">提交</button>
	</div>

<script type="text/javascript">
	function addClassify(){
		document.forms[0].action="furnitureTypeAction!updateType.action";
		document.forms[0].submit();
	};
</script>

</body>
</html>